package com.gitee.wsl.compose.chart.xy.bar.model

/**
 * An interface that defines the y-axis coordinates for vertical bars on a bar plot.
 */
 interface BarPosition<Y> {
    /**
     * The lowest value at which the bar begins on the y-axis
     */
     val yMin: Y

    /**
     * The highest value at which the bar ends on the y-axis
     */
     val yMax: Y
}

fun <Y> BarPosition(yMin: Y, yMax: Y):BarPosition<Y> = DefaultBarPosition(yMin, yMax)

internal data class DefaultBarPosition<Y>(
     override val yMin: Y,
     override val yMax: Y
) : BarPosition<Y>
